{extend name="template/base" /}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__LIB__/webuploader/0.1.5/webuploader.css" />
<link rel="stylesheet" type="text/css" href="__LIB__/fontawesome-4.2.0_ie7/4.2.0/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="__LIB__/tags-input/dist/jquery.tagsinput.min.css" />
{/block}

{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="id" value="{$vo.id ?? ''}">
        <!--<input type="hidden" name="pid" value="{$vo.parent_id ?? 0}">-->
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">名称：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="名称" name="name" value="{$vo.name ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">分数：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="分数" name="min_score" value="{$vo.min_score ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">上级等级：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <select name="pid" class="select">

                    <option value="">请选择上级等级</option>
                    {volist name="ranks" id="rank"}
                    <option value="{$rank.id}">{$rank.name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">订单量：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="订单量" name="order_num" value="{$vo.order_num ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">简介：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea  cols="" rows=""name="desc"  class="textarea" placeholder="简介">{$vo.desc ?? ''}</textarea>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>

{literal}
<script type="text/plain" id="markdown_tpl">
    ---
    方法
    ```
    将 ueditor 的服务地址修改为 Ueditor 控制器，使用方法请参考该示例源码
    ```
</script>
{/literal}
<script>
                    $(function () {

                        $("[name='pid']").find("[value='{$vo.pid}']").attr("selected", true);
                        $('.skin-minimal input').iCheck({
                            checkboxClass: 'icheckbox-blue',
                            radioClass: 'iradio-blue',
                            increaseArea: '20%'
                        });

                        $("#form").Validform({
                            tiptype: 2,
                            ajaxPost: true,
                            showAllError: true,
                            callback: function (ret) {

                                ajax_progress(ret);
                            }
                        });
                    })
</script>
{/block}
